Skip to content

feat(bundler-rspack): add rspack bundler#1703

Open
Mister-Hope wants to merge 15 commits into
mainfrom
rspack
Open

feat(bundler-rspack): add rspack bundler#1703
Mister-Hope wants to merge 15 commits into
mainfrom
rspack

Conversation

@Mister-Hope
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 14, 2026 09:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces a new @vuepress/bundler-rspack package that adds Rspack as an alternative bundler alongside the existing Vite and Webpack bundlers. The implementation closely mirrors the structure of @vuepress/bundler-webpack, including base/client/server config builders (via rspack-chain), dev server with HMR and a trailing-slash middleware, and a build pipeline that produces a client manifest and SSR-renders pages. The package is wired into the meta vuepress package as an optional peer and into the e2e test setup.

Changes:

  • Add new @vuepress/bundler-rspack package with config builders, dev/build pipelines, SSR/markdown loaders, and types.
  • Wire the new bundler into packages/vuepress (optional peer dependency) and into e2e (config + scripts) plus updated pnpm-lock.yaml.
  • Add rspack to the VS Code spell-check dictionary.

Reviewed changes

Copilot reviewed 53 out of 54 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pnpm-lock.yaml Lockfile updates for new Rspack-related dependencies.
packages/vuepress/package.json Adds @vuepress/bundler-rspack as an optional peer dependency.
packages/bundler-rspack/package.json New package manifest with Rspack/loader deps.
packages/bundler-rspack/README.md Package readme.
packages/bundler-rspack/tsdown.config.ts tsdown build config for ESM entry + CJS loaders.
packages/bundler-rspack/src/index.ts Public entry exporting rspackBundler and types.
packages/bundler-rspack/src/rspackBundler.ts Bundler factory wiring dev/build.
packages/bundler-rspack/src/types.ts Bundler/loader option types.
packages/bundler-rspack/src/resolveRspackConfig.ts Applies chainRspack/configureRspack hooks.
packages/bundler-rspack/src/config/* Base/client config (entry, mode, devtool, resolve, module rules, plugins, other options).
packages/bundler-rspack/src/dev/* Dev server config, trailing-slash middleware, dev runner.
packages/bundler-rspack/src/build/* Build pipeline, client plugin/manifest, SSR rendering helpers.
packages/bundler-rspack/src/loaders/* Vue markdown loader and SSR loader (TS + CJS shims).
e2e/package.json Adds rspack-flavored e2e scripts and dependency.
e2e/docs/.vuepress/config.ts Selects rspack bundler when E2E_BUNDLER=rspack.
.vscode/settings.json Adds rspack to spell-check dictionary.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/bundler-rspack/src/config/handleModulePug.ts Outdated
@coveralls
Copy link
Copy Markdown

coveralls commented May 14, 2026

Coverage Report for CI Build 25954718728

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage remained the same at 72.961%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1058
Covered Lines: 767
Line Coverage: 72.5%
Relevant Branches: 536
Covered Branches: 396
Branch Coverage: 73.88%
Branches in Coverage %: Yes
Coverage Strength: 45.84 hits per line

💛 - Coveralls

@Mister-Hope Mister-Hope requested review from Copilot and meteorlxy May 14, 2026 11:23
@Mister-Hope
Copy link
Copy Markdown
Member Author

The PR should be ready for review

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 54 out of 55 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 54 out of 55 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment thread packages/bundler-rspack/src/config/resolveSwcLoaderOptions.ts Outdated
Comment thread packages/bundler-rspack/src/config/handleModuleVue.ts Outdated
@meteorlxy meteorlxy changed the title feat: add @vuepress/bundler-rspack feat(bundler-rspack): add rspack bundler May 14, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 54 out of 55 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment on lines +22 to +46
jsc: {
parser: isTypescript
? {
syntax: 'typescript',
tsx: true,
...jsc.parser,
}
: {
syntax: 'ecmascript',
jsx: true,
...jsc.parser,
},

transform: {
react: {
runtime: 'classic',
pragma: 'jsx',
pragmaFrag: 'Fragment',
development: false,
...jsc.transform?.react,
},
...jsc.transform,
},
...(jsc as SwcLoaderJscConfig),
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants